﻿<%@ Page 
    Title="View All Channels" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" 
    CodeBehind="Channels.aspx.cs" Inherits="WebChat.User.Channels" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">        
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView runat="server" ID="GridViewChannels" 
            AutoGenerateColumns="false" >
        <Columns>
            <asp:TemplateField HeaderText="Channel Name" SortExpression="ChannelName">
                <ItemTemplate>
                    <asp:HyperLink runat="server" 
                            Text='<%# SafeEval("ChannelName") %>' 
                            NavigateUrl='<%# "Channel.aspx?channelId=" + Eval("ChannelId") %>' />
                </ItemTemplate>                
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Registration Date" SortExpression="ChannelName">
                <ItemTemplate>
                    <asp:Literal runat="server" Text='<%# ((DateTime)Eval("RegistrationDate")).ToShortDateString() %>' />
                </ItemTemplate>                
            </asp:TemplateField>
        </Columns>
    </asp:GridView>    
</asp:Content>
